<%@ page import="monitoreomedios.SpotMonitoreado" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'spotMonitoreado.label', default: 'SpotMonitoreado')}" />
		<title><g:message code="default.list.label" args="[entityName]" /></title>
	</head>
	<body>
		<a href="#list-spotMonitoreado" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></li>
				<li><g:link class="create" action="create">Agregar Spot</g:link></li>
			</ul>
		</div>
		
		<div id="list-spotMonitoreado" class="content scaffold-list" role="main">
			<h1><g:message code= "Campaña ${session.nombrecampana}"  /></h1>
			<g:if test="${flash.message}">
			<div class="message" role="status">${flash.message}</div>
			</g:if>
			<table>
				<thead>
					<tr>
					
						<g:sortableColumn property="nombreSpot" title="${message(code: 'spotMonitoreado.nombreSpot.label', default: 'Nombre Spot')}" />
					
						<g:sortableColumn property="tv" title="${message(code: 'spotMonitoreado.tv.label', default: 'Tv')}" />
						
						<g:sortableColumn property="radio" title="${message(code: 'spotMonitoreado.radio.label', default: 'Radio')}" />
					
						<g:sortableColumn property="total" title="Total" />
						
						<th></th>

					</tr>
				</thead>
				<tbody>
				<g:each in="${spotMonitoreadoInstanceList}" status="i" var="spotMonitoreadoInstance">
					<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
						
						
						<td>${fieldValue(bean: spotMonitoreadoInstance, field: "nombreSpot")}</td>
						
						<td> <g:link controller ="MencionMultimedia" action="verDetallesMultimedia" id="${spotMonitoreadoInstance.id}"  params="[clase:'spot', tipo:'tv']"> <g:formatNumber number="${flash.tv[i]}" /> </g:link></td>
						
						<td> <g:link controller ="MencionMultimedia" action="verDetallesMultimedia" id="${spotMonitoreadoInstance.id}"  params="[clase:'spot', tipo:'radio']"><g:formatNumber number="${flash.radio[i]}" /> </g:link></td>
						
						<td> <g:formatNumber number="${flash.radio[i] + flash.tv[i]}" /> </td>
						
						<td><g:link controller="SpotMonitoreado" action="delete" id="${spotMonitoreadoInstance.id}"> X </g:link></td>		</tr>
				</g:each>
				</tbody>
			</table>
			<div class="pagination">
				<g:paginate total="${spotMonitoreadoInstanceTotal}" />
			</div>
		</div>
	</body>
</html>
